
<script type="text/javascript">
jQuery.fn.extend({
    copiarLinha: function (table) {
    	var clone;
        clone =$(table+" tr:last:visible").clone(true);
	  clone.find('input[type=text]').val('');
	  clone.appendTo($(table));
    }
});  
jQuery.fn.extend({
    inserirMaterial: function () {
    	var tr_index = $(this).parent().parent();
        
        $(tr_index).find($('.codMaterial')).toggle();
        //alert('1263');
   
    }
});
</script>